<?php
$tdatasales_order_items=array();
	$tdatasales_order_items[".NumberOfChars"]=80; 
	$tdatasales_order_items[".ShortName"]="sales_order_items";
	$tdatasales_order_items[".OwnerID"]="";
	$tdatasales_order_items[".OriginalTable"]="sales_order_items";


	
//	field labels
$fieldLabelssales_order_items = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelssales_order_items["English"]=array();
	$fieldToolTipssales_order_items["English"]=array();
	$fieldLabelssales_order_items["English"]["id"] = "Id";
	$fieldToolTipssales_order_items["English"]["id"] = "";
	$fieldLabelssales_order_items["English"]["item_no"] = "Item No";
	$fieldToolTipssales_order_items["English"]["item_no"] = "";
	$fieldLabelssales_order_items["English"]["product_id"] = "Product";
	$fieldToolTipssales_order_items["English"]["product_id"] = "";
	$fieldLabelssales_order_items["English"]["property_id"] = "Description";
	$fieldToolTipssales_order_items["English"]["property_id"] = "";
	$fieldLabelssales_order_items["English"]["size_system_id"] = "Size System";
	$fieldToolTipssales_order_items["English"]["size_system_id"] = "";
	$fieldLabelssales_order_items["English"]["unit_price"] = "Unit Price";
	$fieldToolTipssales_order_items["English"]["unit_price"] = "";
	$fieldLabelssales_order_items["English"]["total_quantity"] = "Total Quantity";
	$fieldToolTipssales_order_items["English"]["total_quantity"] = "";
	$fieldLabelssales_order_items["English"]["size_breakup_id"] = "Size Breakup";
	$fieldToolTipssales_order_items["English"]["size_breakup_id"] = "";
	$fieldLabelssales_order_items["English"]["delivery_date"] = "Delivery Date";
	$fieldToolTipssales_order_items["English"]["delivery_date"] = "";
	$fieldLabelssales_order_items["English"]["status"] = "Status";
	$fieldToolTipssales_order_items["English"]["status"] = "";
	$fieldLabelssales_order_items["English"]["sales_order_id"] = "Sales Order Id";
	$fieldToolTipssales_order_items["English"]["sales_order_id"] = "";
	if (count($fieldToolTipssales_order_items["English"])){
		$tdatasales_order_items[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["item_no"] = "Item No";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["item_no"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["product_id"] = "Product Id";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["product_id"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["property_id"] = "Property Id";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["property_id"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["size_system_id"] = "Size System Id";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["size_system_id"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["unit_price"] = "Unit Price";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["unit_price"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["total_quantity"] = "Total Quantity";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["total_quantity"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["size_breakup_id"] = "Size Breakup Id";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["size_breakup_id"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["delivery_date"] = "Delivery Date";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["delivery_date"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["status"] = "Status";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["status"] = "";
	$fieldLabelssales_order_items["Chinese (Hong Kong S.A.R.)"]["sales_order_id"] = "Sales Order Id";
	$fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"]["sales_order_id"] = "";
	if (count($fieldToolTipssales_order_items["Chinese (Hong Kong S.A.R.)"])){
		$tdatasales_order_items[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelssales_order_items["Chinese (Taiwan)"]=array();
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]=array();
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["item_no"] = "Item No";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["item_no"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["product_id"] = "Product Id";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["product_id"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["property_id"] = "Property Id";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["property_id"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["size_system_id"] = "Size System Id";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["size_system_id"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["unit_price"] = "Unit Price";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["unit_price"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["total_quantity"] = "Total Quantity";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["total_quantity"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["size_breakup_id"] = "Size Breakup Id";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["size_breakup_id"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["delivery_date"] = "Delivery Date";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["delivery_date"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["status"] = "Status";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["status"] = "";
	$fieldLabelssales_order_items["Chinese (Taiwan)"]["sales_order_id"] = "Sales Order Id";
	$fieldToolTipssales_order_items["Chinese (Taiwan)"]["sales_order_id"] = "";
	if (count($fieldToolTipssales_order_items["Chinese (Taiwan)"])){
		$tdatasales_order_items[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelssales_order_items["French"]=array();
	$fieldToolTipssales_order_items["French"]=array();
	if (count($fieldToolTipssales_order_items["French"])){
		$tdatasales_order_items[".isUseToolTips"]=true;
	}
}


	
	$tdatasales_order_items[".NCSearch"]=true;

	

$tdatasales_order_items[".shortTableName"] = "sales_order_items";
$tdatasales_order_items[".nSecOptions"] = 0;
$tdatasales_order_items[".recsPerRowList"] = 1;	
$tdatasales_order_items[".tableGroupBy"] = "0";
$tdatasales_order_items[".mainTableOwnerID"] = "";
$tdatasales_order_items[".moveNext"] = 1;




$tdatasales_order_items[".showAddInPopup"] = false;

$tdatasales_order_items[".showEditInPopup"] = false;

$tdatasales_order_items[".showViewInPopup"] = false;


$tdatasales_order_items[".fieldsForRegister"] = array();

$tdatasales_order_items[".listAjax"] = true;

	$tdatasales_order_items[".audit"] = false;

	$tdatasales_order_items[".locking"] = false;
	
$tdatasales_order_items[".listIcons"] = true;
$tdatasales_order_items[".edit"] = true;
$tdatasales_order_items[".inlineEdit"] = true;
$tdatasales_order_items[".view"] = true;

$tdatasales_order_items[".exportTo"] = true;

$tdatasales_order_items[".printFriendly"] = true;

$tdatasales_order_items[".delete"] = true;

$tdatasales_order_items[".showSimpleSearchOptions"] = true;

$tdatasales_order_items[".showSearchPanel"] = true;


$tdatasales_order_items[".isUseAjaxSuggest"] = true;

$tdatasales_order_items[".rowHighlite"] = true;


// button handlers file names

$tdatasales_order_items[".addPageEvents"] = true;

$tdatasales_order_items[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatasales_order_items[".isUseCalendarForSearch"] = true;

// use timepicker for search panel
$tdatasales_order_items[".isUseTimeForSearch"] = false;

$tdatasales_order_items[".isUseiBox"] = false;


$tdatasales_order_items[".useDetailsPreview"] = true;	

$tdatasales_order_items[".isUseInlineAdd"] = true;

$tdatasales_order_items[".isUseInlineEdit"] = true;
$tdatasales_order_items[".isUseInlineJs"] = $tdatasales_order_items[".isUseInlineAdd"] || $tdatasales_order_items[".isUseInlineEdit"];

$tdatasales_order_items[".allSearchFields"] = array();

$tdatasales_order_items[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "id";	
}
$tdatasales_order_items[".globSearchFields"][] = "sales_order_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("sales_order_id", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "sales_order_id";	
}
$tdatasales_order_items[".globSearchFields"][] = "item_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("item_no", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "item_no";	
}
$tdatasales_order_items[".globSearchFields"][] = "product_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("product_id", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "product_id";	
}
$tdatasales_order_items[".globSearchFields"][] = "property_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("property_id", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "property_id";	
}
$tdatasales_order_items[".globSearchFields"][] = "size_system_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("size_system_id", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "size_system_id";	
}
$tdatasales_order_items[".globSearchFields"][] = "unit_price";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("unit_price", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "unit_price";	
}
$tdatasales_order_items[".globSearchFields"][] = "total_quantity";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("total_quantity", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "total_quantity";	
}
$tdatasales_order_items[".globSearchFields"][] = "size_breakup_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("size_breakup_id", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "size_breakup_id";	
}
$tdatasales_order_items[".globSearchFields"][] = "delivery_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("delivery_date", $tdatasales_order_items[".allSearchFields"]))
{
	$tdatasales_order_items[".allSearchFields"][] = "delivery_date";	
}


$tdatasales_order_items[".googleLikeFields"][] = "id";
$tdatasales_order_items[".googleLikeFields"][] = "sales_order_id";
$tdatasales_order_items[".googleLikeFields"][] = "item_no";
$tdatasales_order_items[".googleLikeFields"][] = "product_id";
$tdatasales_order_items[".googleLikeFields"][] = "property_id";
$tdatasales_order_items[".googleLikeFields"][] = "size_system_id";
$tdatasales_order_items[".googleLikeFields"][] = "unit_price";
$tdatasales_order_items[".googleLikeFields"][] = "total_quantity";
$tdatasales_order_items[".googleLikeFields"][] = "size_breakup_id";
$tdatasales_order_items[".googleLikeFields"][] = "delivery_date";
$tdatasales_order_items[".googleLikeFields"][] = "status";



$tdatasales_order_items[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "id";	
}
$tdatasales_order_items[".advSearchFields"][] = "sales_order_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("sales_order_id", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "sales_order_id";	
}
$tdatasales_order_items[".advSearchFields"][] = "item_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("item_no", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "item_no";	
}
$tdatasales_order_items[".advSearchFields"][] = "product_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("product_id", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "product_id";	
}
$tdatasales_order_items[".advSearchFields"][] = "property_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("property_id", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "property_id";	
}
$tdatasales_order_items[".advSearchFields"][] = "size_system_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("size_system_id", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "size_system_id";	
}
$tdatasales_order_items[".advSearchFields"][] = "unit_price";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("unit_price", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "unit_price";	
}
$tdatasales_order_items[".advSearchFields"][] = "total_quantity";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("total_quantity", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "total_quantity";	
}
$tdatasales_order_items[".advSearchFields"][] = "size_breakup_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("size_breakup_id", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "size_breakup_id";	
}
$tdatasales_order_items[".advSearchFields"][] = "delivery_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("delivery_date", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "delivery_date";	
}
$tdatasales_order_items[".advSearchFields"][] = "status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("status", $tdatasales_order_items[".allSearchFields"])) 
{
	$tdatasales_order_items[".allSearchFields"][] = "status";	
}

$tdatasales_order_items[".isTableType"] = "list";


	

$tdatasales_order_items[".isDisplayLoading"] = true;

$tdatasales_order_items[".isResizeColumns"] = false;

	$tdatasales_order_items[".subQueriesSupAccess"] = true;




$tdatasales_order_items[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatasales_order_items[".strOrderBy"] = $gstrOrderBy;
	
$tdatasales_order_items[".orderindexes"] = array();

$tdatasales_order_items[".sqlHead"] = "SELECT id,   sales_order_id,   item_no,   product_id,   property_id,   size_system_id,   unit_price,   total_quantity,   size_breakup_id,   delivery_date,   status";
$tdatasales_order_items[".sqlFrom"] = "FROM sales_order_items";
$tdatasales_order_items[".sqlWhereExpr"] = "";
$tdatasales_order_items[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatasales_order_items[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatasales_order_items[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatasales_order_items[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["id"]=$fdata;
//	sales_order_id
	$fdata = array();
	$fdata["strName"] = "sales_order_id";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Sales Order Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "sales_order_id";
	
		$fdata["FullName"]= "sales_order_id";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["sales_order_id"]=$fdata;
//	item_no
	$fdata = array();
	$fdata["strName"] = "item_no";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Item No"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "item_no";
	
		$fdata["FullName"]= "item_no";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["item_no"]=$fdata;
//	product_id
	$fdata = array();
	$fdata["strName"] = "product_id";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Product"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="product_name";
				$fdata["LookupTable"]="products";
	$fdata["LookupOrderBy"]="product_name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "product_id";
	
		$fdata["FullName"]= "product_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["product_id"]=$fdata;
//	property_id
	$fdata = array();
	$fdata["strName"] = "property_id";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Description"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="style_name";
				$fdata["LookupTable"]="styles";
	$fdata["LookupOrderBy"]="style_name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "property_id";
	
		$fdata["FullName"]= "property_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 5;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["property_id"]=$fdata;
//	size_system_id
	$fdata = array();
	$fdata["strName"] = "size_system_id";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Size System"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="size_system_name";
				$fdata["LookupTable"]="size_systems";
	$fdata["LookupOrderBy"]="size_system_name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "size_system_id";
	
		$fdata["FullName"]= "size_system_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 6;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["size_system_id"]=$fdata;
//	unit_price
	$fdata = array();
	$fdata["strName"] = "unit_price";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Unit Price"; 
	
		
		
	$fdata["FieldType"]= 14;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "unit_price";
	
		$fdata["FullName"]= "unit_price";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 7;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["unit_price"]=$fdata;
//	total_quantity
	$fdata = array();
	$fdata["strName"] = "total_quantity";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Total Quantity"; 
	
		
		
	$fdata["FieldType"]= 14;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "total_quantity";
	
		$fdata["FullName"]= "total_quantity";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["total_quantity"]=$fdata;
//	size_breakup_id
	$fdata = array();
	$fdata["strName"] = "size_breakup_id";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Size Breakup"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "size_breakup_id";
	
		$fdata["FullName"]= "size_breakup_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 9;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["size_breakup_id"]=$fdata;
//	delivery_date
	$fdata = array();
	$fdata["strName"] = "delivery_date";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Delivery Date"; 
	
		
		
	$fdata["FieldType"]= 7;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "delivery_date";
	
		$fdata["FullName"]= "delivery_date";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 10;
		$fdata["DateEditType"] = 13; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasales_order_items["delivery_date"]=$fdata;
//	status
	$fdata = array();
	$fdata["strName"] = "status";
	$fdata["ownerTable"] = "sales_order_items";
		$fdata["Label"]="Status"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "status";
	
		$fdata["FullName"]= "status";
	
		
		
		
		
		
				$fdata["Index"]= 11;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=1";
		
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				
		
				
		
		
		
			$tdatasales_order_items["status"]=$fdata;

	
$tables_data["sales_order_items"]=&$tdatasales_order_items;
$field_labels["sales_order_items"] = &$fieldLabelssales_order_items;
$fieldToolTips["sales_order_items"] = &$fieldToolTipssales_order_items;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["sales_order_items"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="sales_order_size_breakup";
	$detailsTablesData["sales_order_items"][$dIndex] = array(
		  "dDataSourceTable"=>"sales_order_size_breakup"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"sales_order_size_breakup"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"1"
		, "sqlHead"=>"SELECT id,   sales_order_id,   sales_item_id,   specification_id,   quantity"	
		, "sqlFrom"=>"FROM sales_order_size_breakup"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$detailsTablesData["sales_order_items"][$dIndex]["masterKeys"][]="sales_order_id";
		$detailsTablesData["sales_order_items"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["sales_order_items"][$dIndex]["detailKeys"][]="sales_order_id";
		$detailsTablesData["sales_order_items"][$dIndex]["detailKeys"][]="sales_item_id";


	
// tables which are master tables for current table (detail)
$masterTablesData["sales_order_items"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="sales_orders";
	$masterTablesData["sales_order_items"][$mIndex] = array(
		  "mDataSourceTable"=>"sales_orders"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "sales_orders"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "1"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["sales_order_items"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["sales_order_items"][$mIndex]["detailKeys"][]="sales_order_id";

$mIndex = 2-1;
			$strOriginalDetailsTable="products";
	$masterTablesData["sales_order_items"][$mIndex] = array(
		  "mDataSourceTable"=>"products"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "products"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "1"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["sales_order_items"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["sales_order_items"][$mIndex]["detailKeys"][]="product_id";

$mIndex = 3-1;
			$strOriginalDetailsTable="styles";
	$masterTablesData["sales_order_items"][$mIndex] = array(
		  "mDataSourceTable"=>"styles"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "styles"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["sales_order_items"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["sales_order_items"][$mIndex]["detailKeys"][]="property_id";

$mIndex = 4-1;
			$strOriginalDetailsTable="size_systems";
	$masterTablesData["sales_order_items"][$mIndex] = array(
		  "mDataSourceTable"=>"size_systems"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "size_systems"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "1"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["sales_order_items"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["sales_order_items"][$mIndex]["detailKeys"][]="size_system_id";

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto327=array();
$proto327["m_strHead"] = "SELECT";
$proto327["m_strFieldList"] = "id,   sales_order_id,   item_no,   product_id,   property_id,   size_system_id,   unit_price,   total_quantity,   size_breakup_id,   delivery_date,   status";
$proto327["m_strFrom"] = "FROM sales_order_items";
$proto327["m_strWhere"] = "";
$proto327["m_strOrderBy"] = "";
$proto327["m_strTail"] = "";
$proto328=array();
$proto328["m_sql"] = "";
$proto328["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto328["m_column"]=$obj;
$proto328["m_contained"] = array();
$proto328["m_strCase"] = "";
$proto328["m_havingmode"] = "0";
$proto328["m_inBrackets"] = "0";
$proto328["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto328);

$proto327["m_where"] = $obj;
$proto330=array();
$proto330["m_sql"] = "";
$proto330["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto330["m_column"]=$obj;
$proto330["m_contained"] = array();
$proto330["m_strCase"] = "";
$proto330["m_havingmode"] = "0";
$proto330["m_inBrackets"] = "0";
$proto330["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto330);

$proto327["m_having"] = $obj;
$proto327["m_fieldlist"] = array();
						$proto332=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "sales_order_items"
));

$proto332["m_expr"]=$obj;
$proto332["m_alias"] = "";
$obj = new SQLFieldListItem($proto332);

$proto327["m_fieldlist"][]=$obj;
						$proto334=array();
			$obj = new SQLField(array(
	"m_strName" => "sales_order_id",
	"m_strTable" => "sales_order_items"
));

$proto334["m_expr"]=$obj;
$proto334["m_alias"] = "";
$obj = new SQLFieldListItem($proto334);

$proto327["m_fieldlist"][]=$obj;
						$proto336=array();
			$obj = new SQLField(array(
	"m_strName" => "item_no",
	"m_strTable" => "sales_order_items"
));

$proto336["m_expr"]=$obj;
$proto336["m_alias"] = "";
$obj = new SQLFieldListItem($proto336);

$proto327["m_fieldlist"][]=$obj;
						$proto338=array();
			$obj = new SQLField(array(
	"m_strName" => "product_id",
	"m_strTable" => "sales_order_items"
));

$proto338["m_expr"]=$obj;
$proto338["m_alias"] = "";
$obj = new SQLFieldListItem($proto338);

$proto327["m_fieldlist"][]=$obj;
						$proto340=array();
			$obj = new SQLField(array(
	"m_strName" => "property_id",
	"m_strTable" => "sales_order_items"
));

$proto340["m_expr"]=$obj;
$proto340["m_alias"] = "";
$obj = new SQLFieldListItem($proto340);

$proto327["m_fieldlist"][]=$obj;
						$proto342=array();
			$obj = new SQLField(array(
	"m_strName" => "size_system_id",
	"m_strTable" => "sales_order_items"
));

$proto342["m_expr"]=$obj;
$proto342["m_alias"] = "";
$obj = new SQLFieldListItem($proto342);

$proto327["m_fieldlist"][]=$obj;
						$proto344=array();
			$obj = new SQLField(array(
	"m_strName" => "unit_price",
	"m_strTable" => "sales_order_items"
));

$proto344["m_expr"]=$obj;
$proto344["m_alias"] = "";
$obj = new SQLFieldListItem($proto344);

$proto327["m_fieldlist"][]=$obj;
						$proto346=array();
			$obj = new SQLField(array(
	"m_strName" => "total_quantity",
	"m_strTable" => "sales_order_items"
));

$proto346["m_expr"]=$obj;
$proto346["m_alias"] = "";
$obj = new SQLFieldListItem($proto346);

$proto327["m_fieldlist"][]=$obj;
						$proto348=array();
			$obj = new SQLField(array(
	"m_strName" => "size_breakup_id",
	"m_strTable" => "sales_order_items"
));

$proto348["m_expr"]=$obj;
$proto348["m_alias"] = "";
$obj = new SQLFieldListItem($proto348);

$proto327["m_fieldlist"][]=$obj;
						$proto350=array();
			$obj = new SQLField(array(
	"m_strName" => "delivery_date",
	"m_strTable" => "sales_order_items"
));

$proto350["m_expr"]=$obj;
$proto350["m_alias"] = "";
$obj = new SQLFieldListItem($proto350);

$proto327["m_fieldlist"][]=$obj;
						$proto352=array();
			$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "sales_order_items"
));

$proto352["m_expr"]=$obj;
$proto352["m_alias"] = "";
$obj = new SQLFieldListItem($proto352);

$proto327["m_fieldlist"][]=$obj;
$proto327["m_fromlist"] = array();
												$proto354=array();
$proto354["m_link"] = "SQLL_MAIN";
			$proto355=array();
$proto355["m_strName"] = "sales_order_items";
$proto355["m_columns"] = array();
$proto355["m_columns"][] = "id";
$proto355["m_columns"][] = "sales_order_id";
$proto355["m_columns"][] = "item_no";
$proto355["m_columns"][] = "product_id";
$proto355["m_columns"][] = "property_id";
$proto355["m_columns"][] = "size_system_id";
$proto355["m_columns"][] = "unit_price";
$proto355["m_columns"][] = "total_quantity";
$proto355["m_columns"][] = "size_breakup_id";
$proto355["m_columns"][] = "delivery_date";
$proto355["m_columns"][] = "status";
$obj = new SQLTable($proto355);

$proto354["m_table"] = $obj;
$proto354["m_alias"] = "";
$proto356=array();
$proto356["m_sql"] = "";
$proto356["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto356["m_column"]=$obj;
$proto356["m_contained"] = array();
$proto356["m_strCase"] = "";
$proto356["m_havingmode"] = "0";
$proto356["m_inBrackets"] = "0";
$proto356["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto356);

$proto354["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto354);

$proto327["m_fromlist"][]=$obj;
$proto327["m_groupby"] = array();
$proto327["m_orderby"] = array();
$obj = new SQLQuery($proto327);

$queryData_sales_order_items = $obj;
$tdatasales_order_items[".sqlquery"] = $queryData_sales_order_items;

include(getabspath("include/sales_order_items_events.php"));
$tableEvents["sales_order_items"] = new eventclass_sales_order_items;

?>
